<template>
	<view class="find-search-input y-flex y-row y-align-center" :style="{'background-color': bgColor, 'border-radius': borderRadius + 'rpx'}" @tap="handleTap">
		<com-icon name="search" size="28" weight="bold" :color="color"></com-icon>
		<com-text style="margin-left: 20rpx" :value="placeholder" size="30" :color="color"></com-text>
	</view>
</template>

<script>
	export default {
		inject: ['getSkinColor', 'navigate'],
		props: {
			options: {
				type: Object,
				default () {
					return new Object
				}
			},
			bgColor: {
				type: String,
				default: ''
			}
		},
		computed: {
			skinColor () {
				return this.getSkinColor()
			},
			color () {
				return this.skinColor.color_3
			},
			borderRadius () {
				return this.options.borderRadius
			},
			placeholder () {
				return this.options.placeholder || '输入关键词'
			}
		},
		methods: {
			handleTap () {
				this.navigate(this.options.url)
			}
		}
	}
</script>

<style>
	.find-search-input {
		padding: 15rpx 30rpx;
	}
</style>